package com.demo.po;

import java.util.List;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;

/**
 * User model.

将表结构放在此，消除记忆负担
mysql> desc blog;
+---------+--------------+------+-----+---------+----------------+
| Field    | Type         | Null | Key | Default | Extra          |
+---------+--------------+------+-----+---------+----------------+
| id       | int(11)      | NO   | PRI | NULL    | auto_increment |
| username | varchar(200) | NO   |     | NULL    |                |
| picadd   | mediumtext   | NO   |     | NULL    |                |
| posL     | mediumtext   | NO   |     | NULL    |                |
| posR     | mediumtext   | NO   |     | NULL    |                |
| pictype  | mediumtext   | NO   |     | NULL    |                |
+---------+--------------+------+-----+---------+----------------+

数据库字段名建议使用驼峰命名规则，便于与 java 代码保持一致，如字段名： userId
 */
@SuppressWarnings("serial")
public class MapAttr extends Model<MapAttr> {
	public void deleteByName(String username){
		Db.batch("delete from mapattr where username=?", new Object[][]{{username}},100);		
	}
}
